{% extends "base.html" %}
{% block title %}Log-in{% endblock %}
{% block content %}
    <h1>Login</h1>
    {% if form.errors %}
        <p>Your username and password didn't match.
           Please try again.</p>
    {% else %}
        <p>Please type your username and password. If you don't have an account, Click <a href="{% url 'register' %}">Registe</a>.</p>
    {% endif %}
    <div class='login-form'>
        <form action="{% url 'login' %}" method="POST">
            {{ form.as_p }}
            {% csrf_token %}
            <input type="hidden" value="{{ next }}" />
            <p><input type="submit" value="Login" /></p>
        </form>
        <p>
            <a href="{% url 'password_reset' %}">Foggoten password?</a>
        </p>
    </div>
{% endblock %}